package com.evony.common.beans 
{
    import com.evony.common.*;
    import flash.events.*;
    import mx.collections.*;
    import mx.events.*;
    
    public class GamblingRankingBean extends Object
    {
        public function GamblingRankingBean(arg1:Object=null)
        {
            super();
            var loc1:*=0;
            var loc2:*=null;
            _809208522itemsBeansArray = new mx.collections.ArrayCollection();
            _bindingEventDispatcher = new flash.events.EventDispatcher(flash.events.IEventDispatcher(this));
            if (arg1 != null) 
            {
                if (arg1.count != null) 
                {
                    this.count = arg1.count;
                }
                if (arg1.isReward != null) 
                {
                    this.isReward = arg1.isReward;
                }
                if (arg1.playerName != null) 
                {
                    this.playerName = arg1.playerName;
                }
                if (arg1.rank != null) 
                {
                    this.rank = arg1.rank;
                }
                if (arg1.itemsBeans) 
                {
                    loc1 = 0;
                    while (loc1 < arg1.itemsBeans.length) 
                    {
                        loc2 = new com.evony.common.beans.ItemBean(arg1.itemsBeans[loc1]);
                        this.itemsBeansArray.addItem(loc2);
                        ++loc1;
                    }
                }
            }
            return;
        }

        public function toDebugString(arg1:String=""):String
        {
            var loc1:*=0;
            var loc2:*="";
            loc2 = loc2 + (arg1 + "count = " + this.count + "\n");
            loc2 = loc2 + (arg1 + "isReward = " + this.isReward + "\n");
            loc2 = loc2 + (arg1 + "playerName = " + this.playerName + "\n");
            loc2 = loc2 + (arg1 + "rank = " + this.rank + "\n");
            loc1 = 0;
            while (loc1 < this.itemsBeansArray.length) 
            {
                loc2 = loc2 + this.getItemsBeans(loc1).toDebugString(arg1 + "itemsBeans[" + loc1 + "].");
                ++loc1;
            }
            return loc2;
        }

        public function copyTo(arg1:com.evony.common.beans.GamblingRankingBean):void
        {
            arg1.count = this.count;
            arg1.isReward = this.isReward;
            arg1.playerName = this.playerName;
            arg1.rank = this.rank;
            com.evony.common.CommonUtil.arrayCopy(this.itemsBeansArray, arg1.itemsBeansArray);
            return;
        }

        public function toObject():Object
        {
            var loc1:*=new Object();
            loc1.count = this.count;
            loc1.isReward = this.isReward;
            loc1.playerName = this.playerName;
            loc1.rank = this.rank;
            return loc1;
        }

        public function getItemsBeans(arg1:int):com.evony.common.beans.ItemBean
        {
            var loc1:*=this.itemsBeansArray[arg1] as com.evony.common.beans.ItemBean;
            return loc1;
        }

        public function setItemsBeans(arg1:com.evony.common.beans.ItemBean, arg2:int):void
        {
            this.itemsBeansArray[arg2] = arg1;
            return;
        }

        [Bindable]
        public var rank:int;

        [Bindable]
        public var isReward:int;

        [Bindable]
        public var itemsBeansArray:mx.collections.ArrayCollection;

        [Bindable]
        public var playerName:String;

        [Bindable]
        public var count:int;
    }
}
